# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=grilo
pkgver=0.3.13
pkgrel=1
pkgdesc="Framework that provides access to various sources of multimedia content"
url="https://wiki.gnome.org/Projects/Grilo"
arch=(x86_64)
license=(LGPL)
depends=(libxml2 libsoup liboauth totem-plparser)
makedepends=(gobject-introspection gtk-doc vala git meson gtk3)
optdepends=('grilo-plugins: Plugins for grilo'
            'gtk3: Test UI')
provides=(libgr{ilo,lnet,lpls}-0.3.so)
_commit=b3372233ee509676ab4408f049549c1020cff7a1  # tags/grilo-0.3.13^0
source=("git+https://gitlab.gnome.org/GNOME/grilo.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/^grilo-//;s/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
